Huge GtkFB patch with lots of small bugfixes and initial selections implementation.
authorAlexander Larsson <alexl@redhat.com>
Sat, 25 Nov 2000 15:44:35 +0000 (15:44 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Sat, 25 Nov 2000 15:44:35 +0000 (15:44 +0000)
2000-11-23  Alexander Larsson  <alexl@redhat.com>

* gdk/linux-fb/gdkselection-fb.c:
Initial selection implementation.

* gtk/gtkselection.c:
if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
requestor in gtk_selection_request.

* gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
Added gdk_selection_property atom.

* gdk/linux-fb/gdkprivate-fb.h:
Export _gdk_selection_window_destroyed.
Removed mask_off_x/y from GdkCursorPrivateFB.
Removed hbearing, added top, left to PangoFBGlyphInfo.

* gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
Call _gdk_selection_window_destroyed
(_gdk_windowing_window_init): Don't call gdk_cursor_new() before
the root window has been created.
(static_dx_hack, static_dy_hack, compare_draw_rects,
gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
in region. They are already sorted. Instead just traverse them in
reverse if draw_direction < 0.

* gdk/linux-fb/gdkinput-ps2.c (send_button_event):
Double-clicks must be sent after the normal button_press.
(gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.

* gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
Pass _gdk_fb_screen_gc instead of NULL.

* gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
Initialize gdk_selection_property.
(gdk_event_make): Remove unused code.

* gdk/linux-fb/gdkcursor-fb.c:
Make the pixmap for the cursor the same size as the mask. Also remove
the mask_off_x/y fields in GdkCursorPrivateFB and combine
_gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
Now the whole cursor is visible.

* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
Fix bug where xdest+height instead of ydest+height was used
to calculate if the source and dest overlapped. This fixes the
redraw bug when the main window in testgtk was scrolled when
partially covered by a tall window.
Copy rectangles in region in order depending on draw_direction.
Also moved the draw_direction flipping of start_y and end_y into
the gc functions, as this might not be what all of them want.
(gdk_fb_draw_lines): Support dashed lines.
(gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
so that the text is positioned correctly (was 1 pixel high).

gdk/linux-fb/gdkgc-fb.c:
Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
all lines were drawn a pixel to short. Also checked the default of
the rest of the values, and they're the same as X now.

* gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
Clean up pixel positioning of the glyphs. Just use bgy->top and
bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
to all divisions to get correct rounding behaviour.

* gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
Moved start_y/end_y flip into draw_drawable implementations.
Flip also x rendering when draw_direction < 0.
Remove unneccesary multiply with draw_direction.

21 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/linux-fb/gdkcursor-fb.c
gdk/linux-fb/gdkdrawable-fb2.c
gdk/linux-fb/gdkfb.h
gdk/linux-fb/gdkgc-fb.c
gdk/linux-fb/gdkgeometry-fb.c
gdk/linux-fb/gdkglobals-fb.c
gdk/linux-fb/gdkinput-ps2.c
gdk/linux-fb/gdkmain-fb.c
gdk/linux-fb/gdkpango-fb.c
gdk/linux-fb/gdkprivate-fb.h
gdk/linux-fb/gdkrender-fb.c
gdk/linux-fb/gdkselection-fb.c
gdk/linux-fb/gdkwindow-fb.c
gtk/gtkselection.c

index df798ee984bc4855a17e5e23050138c341644c87..174ce2b738e009dbfec61cb1a1cf7832657b64e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,74 @@
+2000-11-23  Alexander Larsson  <alexl@redhat.com>
+
+       * gdk/linux-fb/gdkselection-fb.c:
+       Initial selection implementation.
+
+       * gtk/gtkselection.c:
+       if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
+       requestor in gtk_selection_request.
+       
+       * gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
+       Added gdk_selection_property atom.
+
+       * gdk/linux-fb/gdkprivate-fb.h:
+       Export _gdk_selection_window_destroyed.
+       Removed mask_off_x/y from GdkCursorPrivateFB.
+       Removed hbearing, added top, left to PangoFBGlyphInfo.
+
+       * gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
+       Call _gdk_selection_window_destroyed
+       (_gdk_windowing_window_init): Don't call gdk_cursor_new() before
+       the root window has been created.
+       (static_dx_hack, static_dy_hack, compare_draw_rects,
+       gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
+       in region. They are already sorted. Instead just traverse them in
+       reverse if draw_direction < 0.
+       
+       * gdk/linux-fb/gdkinput-ps2.c (send_button_event):
+       Double-clicks must be sent after the normal button_press.
+       (gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.
+       
+       * gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
+       Pass _gdk_fb_screen_gc instead of NULL.
+
+       * gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
+       Initialize gdk_selection_property.
+       (gdk_event_make): Remove unused code.
+
+       * gdk/linux-fb/gdkcursor-fb.c:
+       Make the pixmap for the cursor the same size as the mask. Also remove
+       the mask_off_x/y fields in GdkCursorPrivateFB and combine
+       _gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
+       Now the whole cursor is visible.
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
+       Fix bug where xdest+height instead of ydest+height was used
+       to calculate if the source and dest overlapped. This fixes the
+       redraw bug when the main window in testgtk was scrolled when
+       partially covered by a tall window.
+       Copy rectangles in region in order depending on draw_direction.
+       Also moved the draw_direction flipping of start_y and end_y into
+       the gc functions, as this might not be what all of them want.
+       (gdk_fb_draw_lines): Support dashed lines.
+       (gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
+       so that the text is positioned correctly (was 1 pixel high).
+
+       gdk/linux-fb/gdkgc-fb.c:
+       Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
+       all lines were drawn a pixel to short. Also checked the default of
+       the rest of the values, and they're the same as X now.
+
+       * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
+       Clean up pixel positioning of the glyphs. Just use bgy->top and
+       bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
+       to all divisions to get correct rounding behaviour.
+
+       * gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
+       gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
+       Moved start_y/end_y flip into draw_drawable implementations.
+       Flip also x rendering when draw_direction < 0.
+       Remove unneccesary multiply with draw_direction.
+
 Wed Nov 22 14:11:19 GMT 2000  Tony Gale <gale@gtk.org>
 
        * docs/tutorial/gtk-tut.sgml:
index df798ee984bc4855a17e5e23050138c341644c87..174ce2b738e009dbfec61cb1a1cf7832657b64e2 100644 (file)
@@ -1,3 +1,74 @@
+2000-11-23  Alexander Larsson  <alexl@redhat.com>
+
+       * gdk/linux-fb/gdkselection-fb.c:
+       Initial selection implementation.
+
+       * gtk/gtkselection.c:
+       if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
+       requestor in gtk_selection_request.
+       
+       * gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
+       Added gdk_selection_property atom.
+
+       * gdk/linux-fb/gdkprivate-fb.h:
+       Export _gdk_selection_window_destroyed.
+       Removed mask_off_x/y from GdkCursorPrivateFB.
+       Removed hbearing, added top, left to PangoFBGlyphInfo.
+
+       * gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
+       Call _gdk_selection_window_destroyed
+       (_gdk_windowing_window_init): Don't call gdk_cursor_new() before
+       the root window has been created.
+       (static_dx_hack, static_dy_hack, compare_draw_rects,
+       gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
+       in region. They are already sorted. Instead just traverse them in
+       reverse if draw_direction < 0.
+       
+       * gdk/linux-fb/gdkinput-ps2.c (send_button_event):
+       Double-clicks must be sent after the normal button_press.
+       (gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.
+       
+       * gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
+       Pass _gdk_fb_screen_gc instead of NULL.
+
+       * gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
+       Initialize gdk_selection_property.
+       (gdk_event_make): Remove unused code.
+
+       * gdk/linux-fb/gdkcursor-fb.c:
+       Make the pixmap for the cursor the same size as the mask. Also remove
+       the mask_off_x/y fields in GdkCursorPrivateFB and combine
+       _gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
+       Now the whole cursor is visible.
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
+       Fix bug where xdest+height instead of ydest+height was used
+       to calculate if the source and dest overlapped. This fixes the
+       redraw bug when the main window in testgtk was scrolled when
+       partially covered by a tall window.
+       Copy rectangles in region in order depending on draw_direction.
+       Also moved the draw_direction flipping of start_y and end_y into
+       the gc functions, as this might not be what all of them want.
+       (gdk_fb_draw_lines): Support dashed lines.
+       (gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
+       so that the text is positioned correctly (was 1 pixel high).
+
+       gdk/linux-fb/gdkgc-fb.c:
+       Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
+       all lines were drawn a pixel to short. Also checked the default of
+       the rest of the values, and they're the same as X now.
+
+       * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
+       Clean up pixel positioning of the glyphs. Just use bgy->top and
+       bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
+       to all divisions to get correct rounding behaviour.
+
+       * gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
+       gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
+       Moved start_y/end_y flip into draw_drawable implementations.
+       Flip also x rendering when draw_direction < 0.
+       Remove unneccesary multiply with draw_direction.
+
 Wed Nov 22 14:11:19 GMT 2000  Tony Gale <gale@gtk.org>
 
        * docs/tutorial/gtk-tut.sgml:
index df798ee984bc4855a17e5e23050138c341644c87..174ce2b738e009dbfec61cb1a1cf7832657b64e2 100644 (file)
@@ -1,3 +1,74 @@
+2000-11-23  Alexander Larsson  <alexl@redhat.com>
+
+       * gdk/linux-fb/gdkselection-fb.c:
+       Initial selection implementation.
+
+       * gtk/gtkselection.c:
+       if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
+       requestor in gtk_selection_request.
+       
+       * gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
+       Added gdk_selection_property atom.
+
+       * gdk/linux-fb/gdkprivate-fb.h:
+       Export _gdk_selection_window_destroyed.
+       Removed mask_off_x/y from GdkCursorPrivateFB.
+       Removed hbearing, added top, left to PangoFBGlyphInfo.
+
+       * gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
+       Call _gdk_selection_window_destroyed
+       (_gdk_windowing_window_init): Don't call gdk_cursor_new() before
+       the root window has been created.
+       (static_dx_hack, static_dy_hack, compare_draw_rects,
+       gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
+       in region. They are already sorted. Instead just traverse them in
+       reverse if draw_direction < 0.
+       
+       * gdk/linux-fb/gdkinput-ps2.c (send_button_event):
+       Double-clicks must be sent after the normal button_press.
+       (gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.
+       
+       * gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
+       Pass _gdk_fb_screen_gc instead of NULL.
+
+       * gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
+       Initialize gdk_selection_property.
+       (gdk_event_make): Remove unused code.
+
+       * gdk/linux-fb/gdkcursor-fb.c:
+       Make the pixmap for the cursor the same size as the mask. Also remove
+       the mask_off_x/y fields in GdkCursorPrivateFB and combine
+       _gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
+       Now the whole cursor is visible.
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
+       Fix bug where xdest+height instead of ydest+height was used
+       to calculate if the source and dest overlapped. This fixes the
+       redraw bug when the main window in testgtk was scrolled when
+       partially covered by a tall window.
+       Copy rectangles in region in order depending on draw_direction.
+       Also moved the draw_direction flipping of start_y and end_y into
+       the gc functions, as this might not be what all of them want.
+       (gdk_fb_draw_lines): Support dashed lines.
+       (gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
+       so that the text is positioned correctly (was 1 pixel high).
+
+       gdk/linux-fb/gdkgc-fb.c:
+       Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
+       all lines were drawn a pixel to short. Also checked the default of
+       the rest of the values, and they're the same as X now.
+
+       * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
+       Clean up pixel positioning of the glyphs. Just use bgy->top and
+       bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
+       to all divisions to get correct rounding behaviour.
+
+       * gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
+       gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
+       Moved start_y/end_y flip into draw_drawable implementations.
+       Flip also x rendering when draw_direction < 0.
+       Remove unneccesary multiply with draw_direction.
+
 Wed Nov 22 14:11:19 GMT 2000  Tony Gale <gale@gtk.org>
 
        * docs/tutorial/gtk-tut.sgml:
index df798ee984bc4855a17e5e23050138c341644c87..174ce2b738e009dbfec61cb1a1cf7832657b64e2 100644 (file)
@@ -1,3 +1,74 @@
+2000-11-23  Alexander Larsson  <alexl@redhat.com>
+
+       * gdk/linux-fb/gdkselection-fb.c:
+       Initial selection implementation.
+
+       * gtk/gtkselection.c:
+       if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
+       requestor in gtk_selection_request.
+       
+       * gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
+       Added gdk_selection_property atom.
+
+       * gdk/linux-fb/gdkprivate-fb.h:
+       Export _gdk_selection_window_destroyed.
+       Removed mask_off_x/y from GdkCursorPrivateFB.
+       Removed hbearing, added top, left to PangoFBGlyphInfo.
+
+       * gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
+       Call _gdk_selection_window_destroyed
+       (_gdk_windowing_window_init): Don't call gdk_cursor_new() before
+       the root window has been created.
+       (static_dx_hack, static_dy_hack, compare_draw_rects,
+       gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
+       in region. They are already sorted. Instead just traverse them in
+       reverse if draw_direction < 0.
+       
+       * gdk/linux-fb/gdkinput-ps2.c (send_button_event):
+       Double-clicks must be sent after the normal button_press.
+       (gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.
+       
+       * gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
+       Pass _gdk_fb_screen_gc instead of NULL.
+
+       * gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
+       Initialize gdk_selection_property.
+       (gdk_event_make): Remove unused code.
+
+       * gdk/linux-fb/gdkcursor-fb.c:
+       Make the pixmap for the cursor the same size as the mask. Also remove
+       the mask_off_x/y fields in GdkCursorPrivateFB and combine
+       _gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
+       Now the whole cursor is visible.
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
+       Fix bug where xdest+height instead of ydest+height was used
+       to calculate if the source and dest overlapped. This fixes the
+       redraw bug when the main window in testgtk was scrolled when
+       partially covered by a tall window.
+       Copy rectangles in region in order depending on draw_direction.
+       Also moved the draw_direction flipping of start_y and end_y into
+       the gc functions, as this might not be what all of them want.
+       (gdk_fb_draw_lines): Support dashed lines.
+       (gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
+       so that the text is positioned correctly (was 1 pixel high).
+
+       gdk/linux-fb/gdkgc-fb.c:
+       Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
+       all lines were drawn a pixel to short. Also checked the default of
+       the rest of the values, and they're the same as X now.
+
+       * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
+       Clean up pixel positioning of the glyphs. Just use bgy->top and
+       bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
+       to all divisions to get correct rounding behaviour.
+
+       * gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
+       gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
+       Moved start_y/end_y flip into draw_drawable implementations.
+       Flip also x rendering when draw_direction < 0.
+       Remove unneccesary multiply with draw_direction.
+
 Wed Nov 22 14:11:19 GMT 2000  Tony Gale <gale@gtk.org>
 
        * docs/tutorial/gtk-tut.sgml:
index df798ee984bc4855a17e5e23050138c341644c87..174ce2b738e009dbfec61cb1a1cf7832657b64e2 100644 (file)
@@ -1,3 +1,74 @@
+2000-11-23  Alexander Larsson  <alexl@redhat.com>
+
+       * gdk/linux-fb/gdkselection-fb.c:
+       Initial selection implementation.
+
+       * gtk/gtkselection.c:
+       if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
+       requestor in gtk_selection_request.
+       
+       * gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
+       Added gdk_selection_property atom.
+
+       * gdk/linux-fb/gdkprivate-fb.h:
+       Export _gdk_selection_window_destroyed.
+       Removed mask_off_x/y from GdkCursorPrivateFB.
+       Removed hbearing, added top, left to PangoFBGlyphInfo.
+
+       * gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
+       Call _gdk_selection_window_destroyed
+       (_gdk_windowing_window_init): Don't call gdk_cursor_new() before
+       the root window has been created.
+       (static_dx_hack, static_dy_hack, compare_draw_rects,
+       gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
+       in region. They are already sorted. Instead just traverse them in
+       reverse if draw_direction < 0.
+       
+       * gdk/linux-fb/gdkinput-ps2.c (send_button_event):
+       Double-clicks must be sent after the normal button_press.
+       (gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.
+       
+       * gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
+       Pass _gdk_fb_screen_gc instead of NULL.
+
+       * gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
+       Initialize gdk_selection_property.
+       (gdk_event_make): Remove unused code.
+
+       * gdk/linux-fb/gdkcursor-fb.c:
+       Make the pixmap for the cursor the same size as the mask. Also remove
+       the mask_off_x/y fields in GdkCursorPrivateFB and combine
+       _gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
+       Now the whole cursor is visible.
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
+       Fix bug where xdest+height instead of ydest+height was used
+       to calculate if the source and dest overlapped. This fixes the
+       redraw bug when the main window in testgtk was scrolled when
+       partially covered by a tall window.
+       Copy rectangles in region in order depending on draw_direction.
+       Also moved the draw_direction flipping of start_y and end_y into
+       the gc functions, as this might not be what all of them want.
+       (gdk_fb_draw_lines): Support dashed lines.
+       (gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
+       so that the text is positioned correctly (was 1 pixel high).
+
+       gdk/linux-fb/gdkgc-fb.c:
+       Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
+       all lines were drawn a pixel to short. Also checked the default of
+       the rest of the values, and they're the same as X now.
+
+       * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
+       Clean up pixel positioning of the glyphs. Just use bgy->top and
+       bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
+       to all divisions to get correct rounding behaviour.
+
+       * gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
+       gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
+       Moved start_y/end_y flip into draw_drawable implementations.
+       Flip also x rendering when draw_direction < 0.
+       Remove unneccesary multiply with draw_direction.
+
 Wed Nov 22 14:11:19 GMT 2000  Tony Gale <gale@gtk.org>
 
        * docs/tutorial/gtk-tut.sgml:
index df798ee984bc4855a17e5e23050138c341644c87..174ce2b738e009dbfec61cb1a1cf7832657b64e2 100644 (file)
@@ -1,3 +1,74 @@
+2000-11-23  Alexander Larsson  <alexl@redhat.com>
+
+       * gdk/linux-fb/gdkselection-fb.c:
+       Initial selection implementation.
+
+       * gtk/gtkselection.c:
+       if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
+       requestor in gtk_selection_request.
+       
+       * gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
+       Added gdk_selection_property atom.
+
+       * gdk/linux-fb/gdkprivate-fb.h:
+       Export _gdk_selection_window_destroyed.
+       Removed mask_off_x/y from GdkCursorPrivateFB.
+       Removed hbearing, added top, left to PangoFBGlyphInfo.
+
+       * gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
+       Call _gdk_selection_window_destroyed
+       (_gdk_windowing_window_init): Don't call gdk_cursor_new() before
+       the root window has been created.
+       (static_dx_hack, static_dy_hack, compare_draw_rects,
+       gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
+       in region. They are already sorted. Instead just traverse them in
+       reverse if draw_direction < 0.
+       
+       * gdk/linux-fb/gdkinput-ps2.c (send_button_event):
+       Double-clicks must be sent after the normal button_press.
+       (gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.
+       
+       * gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
+       Pass _gdk_fb_screen_gc instead of NULL.
+
+       * gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
+       Initialize gdk_selection_property.
+       (gdk_event_make): Remove unused code.
+
+       * gdk/linux-fb/gdkcursor-fb.c:
+       Make the pixmap for the cursor the same size as the mask. Also remove
+       the mask_off_x/y fields in GdkCursorPrivateFB and combine
+       _gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
+       Now the whole cursor is visible.
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
+       Fix bug where xdest+height instead of ydest+height was used
+       to calculate if the source and dest overlapped. This fixes the
+       redraw bug when the main window in testgtk was scrolled when
+       partially covered by a tall window.
+       Copy rectangles in region in order depending on draw_direction.
+       Also moved the draw_direction flipping of start_y and end_y into
+       the gc functions, as this might not be what all of them want.
+       (gdk_fb_draw_lines): Support dashed lines.
+       (gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
+       so that the text is positioned correctly (was 1 pixel high).
+
+       gdk/linux-fb/gdkgc-fb.c:
+       Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
+       all lines were drawn a pixel to short. Also checked the default of
+       the rest of the values, and they're the same as X now.
+
+       * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
+       Clean up pixel positioning of the glyphs. Just use bgy->top and
+       bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
+       to all divisions to get correct rounding behaviour.
+
+       * gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
+       gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
+       Moved start_y/end_y flip into draw_drawable implementations.
+       Flip also x rendering when draw_direction < 0.
+       Remove unneccesary multiply with draw_direction.
+
 Wed Nov 22 14:11:19 GMT 2000  Tony Gale <gale@gtk.org>
 
        * docs/tutorial/gtk-tut.sgml:
index df798ee984bc4855a17e5e23050138c341644c87..174ce2b738e009dbfec61cb1a1cf7832657b64e2 100644 (file)
@@ -1,3 +1,74 @@
+2000-11-23  Alexander Larsson  <alexl@redhat.com>
+
+       * gdk/linux-fb/gdkselection-fb.c:
+       Initial selection implementation.
+
+       * gtk/gtkselection.c:
+       if GDK_WINDOWING_FB defined, include linux-fb/gdkfb.h and look up
+       requestor in gtk_selection_request.
+       
+       * gdk/linux-fb/gdkfb.h, gdk/linux-fb/gdkglobals-fb.c:
+       Added gdk_selection_property atom.
+
+       * gdk/linux-fb/gdkprivate-fb.h:
+       Export _gdk_selection_window_destroyed.
+       Removed mask_off_x/y from GdkCursorPrivateFB.
+       Removed hbearing, added top, left to PangoFBGlyphInfo.
+
+       * gdk/linux-fb/gdkwindow-fb.c (_gdk_windowing_window_destroy):
+       Call _gdk_selection_window_destroyed
+       (_gdk_windowing_window_init): Don't call gdk_cursor_new() before
+       the root window has been created.
+       (static_dx_hack, static_dy_hack, compare_draw_rects,
+       gdk_fb_window_move_resize): Remove unnecessary sort of rectangles
+       in region. They are already sorted. Instead just traverse them in
+       reverse if draw_direction < 0.
+       
+       * gdk/linux-fb/gdkinput-ps2.c (send_button_event):
+       Double-clicks must be sent after the normal button_press.
+       (gdk_fb_cursor_unhide): Remove usage of mask_off_x/y. Clean up.
+       
+       * gdk/linux-fb/gdkgeometry-fb.c (gdk_window_scroll):
+       Pass _gdk_fb_screen_gc instead of NULL.
+
+       * gdk/linux-fb/gdkmain-fb.c (_gdk_windowing_init_check):
+       Initialize gdk_selection_property.
+       (gdk_event_make): Remove unused code.
+
+       * gdk/linux-fb/gdkcursor-fb.c:
+       Make the pixmap for the cursor the same size as the mask. Also remove
+       the mask_off_x/y fields in GdkCursorPrivateFB and combine
+       _gdk_cursor_new_from_pixmap() and gdk_cursor_new_from_pixmap()
+       Now the whole cursor is visible.
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_drawable_3):
+       Fix bug where xdest+height instead of ydest+height was used
+       to calculate if the source and dest overlapped. This fixes the
+       redraw bug when the main window in testgtk was scrolled when
+       partially covered by a tall window.
+       Copy rectangles in region in order depending on draw_direction.
+       Also moved the draw_direction flipping of start_y and end_y into
+       the gc functions, as this might not be what all of them want.
+       (gdk_fb_draw_lines): Support dashed lines.
+       (gdk_fb_draw_glyphs): Clean up glyph placement. Also fix positioning
+       so that the text is positioned correctly (was 1 pixel high).
+
+       gdk/linux-fb/gdkgc-fb.c:
+       Initialize cap_style to GTK_CAP_BUTT. This fixes a problem where
+       all lines were drawn a pixel to short. Also checked the default of
+       the rest of the values, and they're the same as X now.
+
+       * gdk/linux-fb/gdkpango-fb.c (pango_fb_font_get_glyph_info):
+       Clean up pixel positioning of the glyphs. Just use bgy->top and
+       bgy->left. Also used PANGO_PIXEL where appropriate and added 0.5
+       to all divisions to get correct rounding behaviour.
+
+       * gdk/linux-fb/gdkrender-fb.c (gdk_fb_draw_drawable_generic,
+       gdk_fb_draw_drawable_memmove, gdk_fb_draw_drawable_aa_24):
+       Moved start_y/end_y flip into draw_drawable implementations.
+       Flip also x rendering when draw_direction < 0.
+       Remove unneccesary multiply with draw_direction.
+
 Wed Nov 22 14:11:19 GMT 2000  Tony Gale <gale@gtk.org>
 
        * docs/tutorial/gtk-tut.sgml:
index 3b38a562d0f4c8a6b1f8c4539cbb51a8801c7cb7..80d51332c464793fc7d112137205fa9445729da5 100644 (file)
@@ -191,39 +191,10 @@ static struct {
 {xterm_mask_bits, xterm_mask_width, xterm_mask_height, xterm_mask_x_hot, xterm_mask_y_hot}
 };
 
-static GdkCursor *
-_gdk_cursor_new_from_pixmap (GdkPixmap *source,
-                            GdkPixmap *mask,
-                            GdkColor  *fg,
-                            GdkColor  *bg,
-                            gint       x,
-                            gint       y,
-                            gint       mask_off_x,
-                            gint       mask_off_y)
-{
-  GdkCursorPrivateFB *private;
-  GdkCursor *cursor;
-
-  g_return_val_if_fail (source != NULL, NULL);
-
-  private = g_new (GdkCursorPrivateFB, 1);
-  cursor = (GdkCursor *) private;
-  cursor->type = GDK_CURSOR_IS_PIXMAP;
-  cursor->ref_count = 1;
-  private->cursor = gdk_pixmap_ref (source);
-  private->mask = gdk_pixmap_ref (mask);
-  private->hot_x = x;
-  private->hot_y = y;
-  private->mask_off_x = mask_off_x;
-  private->mask_off_y = mask_off_y;
-  
-  return cursor;
-}
-
 GdkCursor*
 gdk_cursor_new (GdkCursorType cursor_type)
 {
-  GdkPixmap *pm, *mask;
+  GdkPixmap *tmp_pm, *pm, *mask;
 
   if (cursor_type >= sizeof(stock_cursors)/sizeof(stock_cursors[0]))
     return NULL;
@@ -231,10 +202,32 @@ gdk_cursor_new (GdkCursorType cursor_type)
   pm = stock_cursors[cursor_type].pm;
   if (!pm)
     {
-      pm = stock_cursors[cursor_type].pm = gdk_bitmap_create_from_data (gdk_parent_root,
-                                                                       stock_cursors[cursor_type].bits,
-                                                                       stock_cursors[cursor_type].width,
-                                                                       stock_cursors[cursor_type].height);
+      GdkGC *copy_gc;
+      char *data;
+      tmp_pm = gdk_bitmap_create_from_data (gdk_parent_root,
+                                           stock_cursors[cursor_type].bits,
+                                           stock_cursors[cursor_type].width,
+                                           stock_cursors[cursor_type].height);
+
+      data = g_malloc0 (((stock_cursors[cursor_type+1].width+7)/8) * stock_cursors[cursor_type+1].height);
+      pm = gdk_bitmap_create_from_data (gdk_parent_root,
+                                       data,
+                                       stock_cursors[cursor_type+1].width,
+                                       stock_cursors[cursor_type+1].height);
+      copy_gc = gdk_gc_new (pm);
+      gdk_draw_drawable(pm,
+                       copy_gc,
+                       tmp_pm,
+                       0, 0,
+                       stock_cursors[cursor_type+1].hotx - stock_cursors[cursor_type].hotx,
+                       stock_cursors[cursor_type+1].hoty - stock_cursors[cursor_type].hoty,
+                       stock_cursors[cursor_type].width,
+                       stock_cursors[cursor_type].height);
+      gdk_pixmap_unref (tmp_pm);
+      g_free (data);
+      gdk_gc_unref (copy_gc);
+
+      stock_cursors[cursor_type].pm = pm;
       gdk_pixmap_ref (pm);
     }
   
@@ -248,11 +241,10 @@ gdk_cursor_new (GdkCursorType cursor_type)
       gdk_pixmap_ref (mask);
     }
 
-  return _gdk_cursor_new_from_pixmap (pm, mask, NULL, NULL,
-                                     stock_cursors[cursor_type].hotx,
-                                     stock_cursors[cursor_type].hoty,
-                                     (stock_cursors[cursor_type].hotx - stock_cursors[cursor_type+1].hotx) * 1,
-                                     (stock_cursors[cursor_type].hoty - stock_cursors[cursor_type+1].hoty) * 1);
+  
+  return gdk_cursor_new_from_pixmap (pm, mask, NULL, NULL,
+                                    stock_cursors[cursor_type+1].hotx,
+                                    stock_cursors[cursor_type+1].hoty);
 }
 
 GdkCursor*
@@ -263,7 +255,21 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
                            gint       x,
                            gint       y)
 {
-  return _gdk_cursor_new_from_pixmap (source, mask, fg, bg, x, y, 0, 0);
+  GdkCursorPrivateFB *private;
+  GdkCursor *cursor;
+
+  g_return_val_if_fail (source != NULL, NULL);
+
+  private = g_new (GdkCursorPrivateFB, 1);
+  cursor = (GdkCursor *) private;
+  cursor->type = GDK_CURSOR_IS_PIXMAP;
+  cursor->ref_count = 1;
+  private->cursor = gdk_pixmap_ref (source);
+  private->mask = gdk_pixmap_ref (mask);
+  private->hot_x = x;
+  private->hot_y = y;
+  
+  return cursor;
 }
 
 void
index 24da82c7fe892f8bb6e6c2d566b99bdf02f03277..e184c6a67b6cfac0aaa04aeaf81bf501306894e9 100644 (file)
@@ -529,9 +529,9 @@ gdk_fb_draw_drawable_3 (GdkDrawable *drawable,
       destb.x1 = xdest;
       destb.y1 = ydest;
       destb.x2 = xdest + width;
-      destb.y2 = xdest + height;
+      destb.y2 = ydest + height;
 
-      if (EXTENTCHECK (&srcb, &destb) && ydest > ysrc)
+      if (EXTENTCHECK (&srcb, &destb) && ((ydest > ysrc) || ((ydest == ysrc) && (xdest > xsrc))))
        draw_direction = -1;
     }
 
@@ -590,28 +590,16 @@ gdk_fb_draw_drawable_3 (GdkDrawable *drawable,
   src_x_off = (src_private->abs_x + xsrc) - (private->abs_x + xdest);
   src_y_off = (src_private->abs_y + ysrc) - (private->abs_y + ydest);
 
-  for(i = 0; i < real_clip_region->numRects; i++)
+  for (i = (draw_direction>0)?0:real_clip_region->numRects-1; i >= 0 && i < real_clip_region->numRects; i+=draw_direction)
     {
       GdkRegionBox *cur = &real_clip_region->rects[i];
-      int start_y, end_y;
-
-      if (draw_direction > 0)
-       {
-         start_y = cur->y1;
-         end_y = cur->y2;
-       }
-      else
-       {
-         start_y = cur->y2 - 1;
-         end_y = cur->y1 - 1;
-       }
 
       (*draw_func) (drawable,
                    gc,
                    src,
                    dc,
-                   start_y,
-                   end_y,
+                   cur->y1,
+                   cur->y2,
                    cur->x1,
                    cur->x2,
                    src_x_off,
@@ -835,10 +823,23 @@ gdk_fb_draw_lines (GdkDrawable    *drawable,
                   GdkPoint       *points,
                   gint            npoints)
 {
-  if (GDK_GC_FBDATA (gc)->values.line_width > 0)
-    miWideLine (drawable, gc, 0, npoints, points);
+  GdkGCFBData *private;
+
+  private = GDK_GC_FBDATA (gc);
+  if (private->values.line_width > 0)
+    {
+      if (private->dash_list)
+       miWideDash (drawable, gc, 0, npoints, points);
+      else 
+       miWideLine (drawable, gc, 0, npoints, points);
+    }
   else
-    miZeroLine (drawable, gc, 0, npoints, points);
+    {
+      if (private->dash_list)
+       miZeroDashLine (drawable, gc, 0, npoints, points);
+      else 
+       miZeroLine (drawable, gc, 0, npoints, points);
+    }
 }
 
 static void
@@ -856,7 +857,7 @@ gdk_fb_draw_segments (GdkDrawable    *drawable,
       pts[0].y = segs[i].y1;
       pts[1].x = segs[i].x2;
       pts[1].y = segs[i].y2;
-      
+
       gdk_fb_draw_lines (drawable, gc, pts, 2);
     }
 }
@@ -897,22 +898,18 @@ gdk_fb_draw_glyphs (GdkDrawable      *drawable,
   /* Fake its existence as a pixmap */
 
   pango_fb_font_set_size (font);
-  
+
   for (i = xpos = 0; i < glyphs->num_glyphs; i++)
     {
       PangoFBGlyphInfo *pgi;
-      int this_wid;
 
       pgi = pango_fb_font_get_glyph_info (font, glyphs->glyphs[i].glyph);
 
-      this_wid = (xpos + glyphs->glyphs[i].geometry.width)/PANGO_SCALE;
       gdk_fb_draw_drawable_3 (drawable, gc, (GdkPixmap *)&pgi->fbd,
                              &fbdc,
                              0, 0,
-                             x + (xpos + glyphs->glyphs[i].geometry.x_offset)/PANGO_SCALE,
-                             y + glyphs->glyphs[i].geometry.y_offset / PANGO_SCALE
-                             + pgi->hbearing,
-                             this_wid, pgi->fbd.drawable_data.height);
+                             x + PANGO_PIXELS (xpos) + pgi->left ,  y - pgi->top + 1,
+                             pgi->fbd.drawable_data.width, pgi->fbd.drawable_data.height);
 
       xpos += glyphs->glyphs[i].geometry.width;
     }
index 0fe8da541f8baa1fe6e25ba11b26e3327bdae6c5..ad0fac6edb33278def4d68696c26fa34b063d632 100644 (file)
@@ -20,5 +20,6 @@ extern const char *gdk_progclass;
 #define gdk_pixmap_lookup(xid)    ((GdkPixmap*) (xid))
 #define gdk_font_lookup(xid)      ((GdkFont*) (xid))
 
+extern GdkAtom gdk_selection_property;
 
 #endif /* GDKFB_H */
index 44a06ff9825cdb4a9bd8aef94d34c5d898032286..6878c79743e0a0d50ee05f908045f6eb5643dfd7 100644 (file)
@@ -90,6 +90,7 @@ _gdk_fb_gc_new (GdkDrawable      *drawable,
 
   gdk_fb_gc_set_values (gc, values, values_mask);
 
+  private->values.cap_style = GDK_CAP_BUTT;
   return gc;
 }
 
index 3d419fd4143d79e9dfd363b93570ffd3330e34eb..ace62c6f1fc0ff2de413c445b9fc30113ccbde0e 100644 (file)
@@ -41,7 +41,7 @@ gdk_window_scroll (GdkWindow *window,
       gdk_region_destroy (tmp_region);
 
       gdk_fb_draw_drawable_2 (GDK_DRAWABLE_IMPL(window),
-                             NULL,
+                             _gdk_fb_screen_gc,
                              GDK_DRAWABLE_IMPL(window),
                              dest_rect.x - dx,
                              dest_rect.y - dy,
index 3cc3a9b71ff1c6b3cad42237acb557d53bd1d773..06fbd782090a5a351c51cd678ee270173b358f62 100644 (file)
@@ -40,3 +40,4 @@ GdkFBWindow *gdk_root_window = NULL;
 GdkFBDisplay *gdk_display = NULL;
 GdkCursor *_gdk_fb_pointer_grab_cursor;
 GdkGC *_gdk_fb_screen_gc = NULL;
+GdkAtom gdk_selection_property;
index b0087e0e639414cedc3709e6aabd6b39e37f1c27..047be8f91569f5857f2c4ecdb7bd54f8522a6e16 100644 (file)
@@ -185,11 +185,12 @@ send_button_event (MouseDevice *mouse,
     }
 #endif
 
+  gdk_event_queue_append (event);
+  
   /* For double-clicks */
   if (press_event)
     gdk_event_button_generate (event);
 
-  gdk_event_queue_append (event);
 }
 
 static GdkPixmap *last_contents = NULL;
@@ -260,7 +261,11 @@ void
 gdk_fb_cursor_unhide()
 {
   GdkFBDrawingContext *mydc = gdk_fb_cursor_dc;
-
+  GdkCursorPrivateFB *last_private;
+  GdkDrawableFBData *pixmap_last;
+  
+  last_private = GDK_CURSOR_FB (last_cursor);
+  pixmap_last = GDK_DRAWABLE_IMPL_FBDATA (last_private->cursor);
   cursor_visibility_count++;
   g_assert (cursor_visibility_count <= 1);
   if (cursor_visibility_count < 1)
@@ -272,15 +277,15 @@ gdk_fb_cursor_unhide()
   if (last_cursor)
     {
       if (!last_contents ||
-         GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->width > GDK_DRAWABLE_IMPL_FBDATA (last_contents)->width ||
-         GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->height > GDK_DRAWABLE_IMPL_FBDATA (last_contents)->height)
+         pixmap_last->width > GDK_DRAWABLE_IMPL_FBDATA (last_contents)->width ||
+         pixmap_last->height > GDK_DRAWABLE_IMPL_FBDATA (last_contents)->height)
        {
          if (last_contents)
            gdk_pixmap_unref (last_contents);
 
          last_contents = gdk_pixmap_new (gdk_parent_root,
-                                         GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->width,
-                                         GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->height,
+                                         pixmap_last->width,
+                                         pixmap_last->height,
                                          GDK_DRAWABLE_IMPL_FBDATA (gdk_parent_root)->depth);
        }
 
@@ -291,25 +296,26 @@ gdk_fb_cursor_unhide()
                              last_location.x,
                              last_location.y,
                              0, 0,
-                             GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->width,
-                             GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->height,
+                             pixmap_last->width,
+                             pixmap_last->height,
                              TRUE, FALSE);
-      last_contents_size.x = GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->width;
-      last_contents_size.y = GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->height;
-      gdk_gc_set_clip_mask (cursor_gc, GDK_CURSOR_FB (last_cursor)->mask);
+      last_contents_size.x = pixmap_last->width;
+      last_contents_size.y = pixmap_last->height;
+      
+      gdk_gc_set_clip_mask (cursor_gc, last_private->mask);
       gdk_gc_set_clip_origin (cursor_gc,
-                             last_location.x + GDK_CURSOR_FB (last_cursor)->mask_off_x,
-                             last_location.y + GDK_CURSOR_FB (last_cursor)->mask_off_y);
+                             last_location.x,
+                             last_location.y);
 
       gdk_fb_cursor_dc_reset ();
-      gdk_fb_draw_drawable_3 (GDK_DRAWABLE_IMPL(gdk_parent_root),
+      gdk_fb_draw_drawable_3 (GDK_DRAWABLE_IMPL (gdk_parent_root),
                              cursor_gc,
-                             GDK_DRAWABLE_IMPL (GDK_CURSOR_FB (last_cursor)->cursor),
+                             GDK_DRAWABLE_IMPL (last_private->cursor),
                              mydc,
                              0, 0,
                              last_location.x, last_location.y,
-                             GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->width,
-                             GDK_DRAWABLE_IMPL_FBDATA (GDK_CURSOR_FB (last_cursor)->cursor)->height);
+                             pixmap_last->width,
+                             pixmap_last->height);
     }
   else
     gdk_fb_cursor_invalidate ();
index b1d95548f81c931c935c25d047e7129252887e3b..b814b30364cf2c6f8c52b5376bd70e581ca18717 100644 (file)
@@ -547,6 +547,8 @@ _gdk_windowing_init_check (int argc, char **argv)
 
   gdk_initialized = TRUE;
 
+  gdk_selection_property = gdk_atom_intern ("GDK_SELECTION", FALSE);
+  
   return TRUE;
 }
 
@@ -987,14 +989,9 @@ gdk_event_make (GdkWindow *window,
   if (evmask & type_masks[type])
     {
       GdkEvent *event = gdk_event_new ();
-#if 0
-      guint32 the_time = g_latest_time.tv_sec * 1000 + g_latest_time.tv_usec / 1000;
-#else
       guint32 the_time;
 
-      
       the_time = gdk_fb_get_time ();
-#endif
 
       event->any.type = type;
       event->any.window = gdk_window_ref (window);
index 8cc57a9cc9b6a32cd7ac91fed8c76bd7c11b7e04..6225212477577a575e20c6b38c9b08154aab4bbd 100644 (file)
@@ -477,7 +477,7 @@ pango_fb_font_get_glyph_info (PangoFont *font, PangoGlyph glyph)
   PangoRectangle *my_logical_rect, *my_ink_rect;
   FT_Face ftf;
   gboolean free_buffer = FALSE;
-
+  
   ftf = fbf->ftf;
 
   pango_fb_font_set_size (font);
@@ -511,6 +511,8 @@ pango_fb_font_get_glyph_info (PangoFont *font, PangoGlyph glyph)
        g_error ("Glyph render failed");
 
       renderme = &bgy->bitmap;
+      pgi->top = bgy->top;
+      pgi->left = bgy->left;
       free_buffer = TRUE;
     }
   else
@@ -542,21 +544,19 @@ pango_fb_font_get_glyph_info (PangoFont *font, PangoGlyph glyph)
   my_logical_rect = &pgi->extents[1];
 
   {
-    my_ink_rect->width = (PANGO_SCALE * g->metrics.width) >> 6;
-    my_ink_rect->height = (PANGO_SCALE * g->metrics.height) >> 6;
-    my_ink_rect->x = - ((PANGO_SCALE * g->metrics.horiBearingX) >> 6);
-    my_ink_rect->y = - ((PANGO_SCALE * g->metrics.horiBearingY) >> 6);
+    my_ink_rect->width = (PANGO_SCALE * g->metrics.width + 32) >> 6;
+    my_ink_rect->height = (PANGO_SCALE * g->metrics.height + 32) >> 6;
+    my_ink_rect->x = - ((PANGO_SCALE * g->metrics.horiBearingX + 32) >> 6);
+    my_ink_rect->y = - ((PANGO_SCALE * g->metrics.horiBearingY + 32) >> 6);
   }
 
   {
-    my_logical_rect->width = (PANGO_SCALE * g->metrics.horiAdvance) >> 6;
-    my_logical_rect->height = (PANGO_SCALE * ftf->size->metrics.height) >> 6;
-    my_logical_rect->x = - ((PANGO_SCALE * g->metrics.horiBearingX) >> 6);
-    my_logical_rect->y = - ((PANGO_SCALE * ftf->size->metrics.ascender) >> 6);
+    my_logical_rect->width = (PANGO_SCALE * g->metrics.horiAdvance + 32) >> 6;
+    my_logical_rect->height = (PANGO_SCALE * ftf->size->metrics.height + 32) >> 6;
+    my_logical_rect->x = - ((PANGO_SCALE * g->metrics.horiBearingX + 32) >> 6);
+    my_logical_rect->y = - ((PANGO_SCALE * ftf->size->metrics.ascender + 32) >> 6);
   }
 
-  pgi->hbearing = ((-g->metrics.horiBearingY) >> 6);
-      
   g_hash_table_insert (fbf->glyph_info, GUINT_TO_POINTER(glyph), pgi);
 
   return pgi;
@@ -680,7 +680,7 @@ pango_fb_font_set_size (PangoFont *font)
   if (PANGO_FB_FONT (font)->desc.size != GPOINTER_TO_UINT (fbf->ftf->generic.data))
     {
       fbf->ftf->generic.data = GUINT_TO_POINTER (PANGO_FB_FONT (font)->desc.size);
-      FT_Set_Char_Size (fbf->ftf, 0, (PANGO_FB_FONT (font)->desc.size << 6)/PANGO_SCALE, 72, 72);
+      FT_Set_Char_Size (fbf->ftf, 0, PANGO_PIXELS (PANGO_FB_FONT (font)->desc.size << 6), 72, 72);
     }
 }
 
@@ -721,8 +721,8 @@ pango_fb_font_get_metrics (PangoFont        *font,
 
   if (metrics)
     {
-      metrics->ascent = ftf->size->metrics.ascender * PANGO_SCALE >> 6;
-      metrics->descent = ftf->size->metrics.descender * PANGO_SCALE >> 6;
+      metrics->ascent = (ftf->size->metrics.ascender * PANGO_SCALE + 32) >> 6;
+      metrics->descent = (ftf->size->metrics.descender * PANGO_SCALE + 32) >> 6;
     }
 }
 
index 6ae7fc63def1e3455801085bbb3b8284431b71cc..a07c61660478310c0e192e8ada64f37600ef3856 100644 (file)
@@ -144,7 +144,6 @@ typedef struct {
   GdkCursor base;
   GdkPixmap *cursor, *mask;
   int hot_x, hot_y;
-  int mask_off_x, mask_off_y;
 } GdkCursorPrivateFB;
 
 typedef struct {
@@ -252,6 +251,7 @@ GType gdk_gc_fb_get_type (void) G_GNUC_CONST;
 /* Routines from gdkgeometry-fb.c */
 
 void      _gdk_window_init_position          (GdkWindow       *window);
+void      _gdk_selection_window_destroyed    (GdkWindow       *window);
 void      _gdk_window_move_resize_child      (GdkWindow       *window,
                                              gint             x,
                                              gint             y,
@@ -403,7 +403,7 @@ struct _PangoFBFont
 typedef struct {
   PangoRectangle extents[2];
   GdkPixmapFBData fbd;
-  int hbearing;
+  int top, left;
 } PangoFBGlyphInfo;
 
 GType pango_fb_font_get_type (void) G_GNUC_CONST;
index 1bcc4096901d7fbfe690025d90a9b79c3c9df855..ab6610e54235cc8e4fa80e567258b4016a947a37 100644 (file)
@@ -701,9 +701,25 @@ gdk_fb_draw_drawable_generic (GdkDrawable *drawable,
   GdkDrawableFBData *private = GDK_DRAWABLE_FBDATA (drawable);
   int cur_x, cur_y;
 
-  for (cur_y = start_y; cur_y*draw_direction < end_y*draw_direction; cur_y+=draw_direction)
+  if (draw_direction < 0)
     {
-      for (cur_x = start_x; cur_x < end_x; cur_x++)
+      int tmp;
+      tmp = start_y;
+      start_y = end_y;
+      end_y = tmp;
+      start_y--;
+      end_y--;
+      
+      tmp = start_x;
+      start_x = end_x;
+      end_x = tmp;
+      start_x--;
+      end_x--;
+    }
+
+  for (cur_y = start_y; cur_y != end_y; cur_y+=draw_direction)
+    {
+      for (cur_x = start_x; cur_x != end_x; cur_x+=draw_direction)
        {
          GdkColor spot;
          
@@ -851,8 +867,18 @@ gdk_fb_draw_drawable_memmove (GdkDrawable *drawable,
   guchar *srcmem = src_private->mem;
   int linelen = (end_x - start_x)*(depth>>3);
   gint cur_y;
-  
-  for(cur_y = start_y; cur_y*draw_direction < end_y*draw_direction; cur_y += draw_direction)
+
+  if (draw_direction < 0)
+    {
+      int tmp;
+      tmp = start_y;
+      start_y = end_y;
+      end_y = tmp;
+      start_y--;
+      end_y--;
+    }
+
+  for(cur_y = start_y; cur_y != end_y; cur_y += draw_direction)
     {
       memmove (dc->mem + (cur_y * dc->rowstride) + start_x*(depth>>3),
               srcmem + ((cur_y + src_y_off)*src_rowstride) + (start_x + src_x_off)*(depth>>3),
@@ -893,10 +919,26 @@ gdk_fb_draw_drawable_aa_24 (GdkDrawable *drawable,
   fg_r = fg.red >> 8;
   fg_g = fg.green >> 8;
   fg_b = fg.blue >> 8;
-  
-  for (y = start_y; y*draw_direction < end_y*draw_direction; y+=draw_direction)
+
+  if (draw_direction < 0)
+    {
+      int tmp;
+      tmp = start_y;
+      start_y = end_y;
+      end_y = tmp;
+      start_y--;
+      end_y--;
+      
+      tmp = start_x;
+      start_x = end_x;
+      end_x = tmp;
+      start_x--;
+      end_x--;
+    }
+
+  for (y = start_y; y != end_y; y+=draw_direction)
     {
-      for (x = start_x; x < end_x; x++)
+      for (x = start_x; x != end_x; x+=draw_direction)
        {
          grayval = smem[x + src_x_off + (y + src_y_off) * src_rowstride];
 
@@ -1119,7 +1161,7 @@ _gdk_fb_gc_calc_state (GdkGC           *gc,
        break;
       }
     }
-
+  
   if (!gc_private->values.clip_mask &&
       !gc_private->values.tile &&
       !gc_private->values.stipple &&
index a9a0053e80f2ea65763a8d3d78aafbfd9df1286e..91ad6f159b358c01c4a097ccacb04ea63188c950 100644 (file)
 #include "gdkprivate-fb.h"
 
 
+typedef struct _OwnerInfo OwnerInfo;
+
+struct _OwnerInfo
+{
+  GdkAtom    selection;
+  GdkWindow *owner;
+};
+
+GSList *owner_list;
+
+/* When a window is destroyed we check if it is the owner
+ * of any selections. This is somewhat inefficient, but
+ * owner_list is typically short, and it is a low memory,
+ * low code solution
+ */
+void
+_gdk_selection_window_destroyed (GdkWindow *window)
+{
+  GSList *tmp_list = owner_list;
+  while (tmp_list)
+    {
+      OwnerInfo *info = tmp_list->data;
+      tmp_list = tmp_list->next;
+      
+      if (info->owner == window)
+       {
+         owner_list = g_slist_remove (owner_list, info);
+         g_free (info);
+       }
+    }
+}
+
 gint
 gdk_selection_owner_set (GdkWindow *owner,
                         GdkAtom    selection,
                         guint32    time,
                         gint       send_event)
 {
-  return FALSE;
+  GSList *tmp_list;
+  OwnerInfo *info;
+
+  tmp_list = owner_list;
+  while (tmp_list)
+    {
+      info = tmp_list->data;
+      if (info->selection == selection)
+       {
+         owner_list = g_slist_remove (owner_list, info);
+         g_free (info);
+         break;
+       }
+      tmp_list = tmp_list->next;
+    }
+
+  if (owner)
+    {
+      info = g_new (OwnerInfo, 1);
+      info->owner = owner;
+      info->selection = selection;
+
+      owner_list = g_slist_prepend (owner_list, info);
+    }
+
+  return TRUE;
 }
 
 GdkWindow*
 gdk_selection_owner_get (GdkAtom selection)
 {
+  OwnerInfo *info;
+  GSList *tmp_list;
+  
+  tmp_list = owner_list;
+  while (tmp_list)
+    {
+      info = tmp_list->data;
+      if (info->selection == selection)
+       {
+         return info->owner;
+       }
+      tmp_list = tmp_list->next;
+    }
   return NULL;
 }
 
@@ -53,6 +123,33 @@ gdk_selection_convert (GdkWindow *requestor,
                       GdkAtom    target,
                       guint32    time)
 {
+  GdkEvent *event;
+  GdkWindow *owner;
+  
+  owner = gdk_selection_owner_get (selection);
+  
+  if (owner)
+    {
+      event = gdk_event_make (owner, GDK_SELECTION_REQUEST, TRUE);
+      if (event)
+       {
+         event->selection.requestor = requestor;
+         event->selection.selection = selection;
+         event->selection.target = target;
+         event->selection.property = gdk_selection_property;
+       }
+    }
+  else
+    {
+      /* If no owner for the specified selection exists, the X server
+       * generates a SelectionNotify event to the requestor with property None.
+       */
+      gdk_selection_send_notify ((guint32)requestor,
+                                selection,
+                                target,
+                                GDK_NONE,
+                                0);
+    }
 }
 
 gint
@@ -61,10 +158,46 @@ gdk_selection_property_get (GdkWindow  *requestor,
                            GdkAtom    *ret_type,
                            gint       *ret_format)
 {
+  guchar *t = NULL;
+  GdkAtom prop_type;
+  gint prop_format;
+  gint prop_len;
+  
   g_return_val_if_fail (requestor != NULL, 0);
   g_return_val_if_fail (GDK_IS_WINDOW (requestor), 0);
+  
+  if (!gdk_property_get (requestor,
+                        gdk_selection_property,
+                        0/*AnyPropertyType?*/,
+                        0, 0,
+                        FALSE,
+                        &prop_type, &prop_format, &prop_len,
+                        &t))
+    {
+      *data = NULL;
+      return 0;
+    }
 
-  return 0;
+  if (ret_type)
+    *ret_type = prop_type;
+  if (ret_format)
+    *ret_format = prop_format;
+
+  if (!gdk_property_get (requestor,
+                        gdk_selection_property,
+                        0/*AnyPropertyType?*/,
+                        0, prop_len + 1,
+                        FALSE,
+                        &prop_type, &prop_format, &prop_len,
+                        &t))
+    {
+      *data = NULL;
+      return 0;
+    }
+  
+  *data = t;
+  
+  return prop_len;
 }
 
 
@@ -75,6 +208,16 @@ gdk_selection_send_notify (guint32  requestor,
                           GdkAtom  property,
                           guint32  time)
 {
+  GdkEvent *event;
+  
+  event = gdk_event_make (gdk_window_lookup (requestor), GDK_SELECTION_NOTIFY, TRUE);
+  if (event)
+    {
+      event->selection.selection = selection;
+      event->selection.target = target;
+      event->selection.property = property;
+      event->selection.requestor = (GdkNativeWindow) requestor;
+    }
 }
 
 gint
@@ -82,6 +225,7 @@ gdk_text_property_to_text_list (GdkAtom encoding, gint format,
                                const guchar *text, gint length,
                                gchar ***list)
 {
+  g_warning ("gdk_text_property_to_text_list() not implemented\n");
   return 0;
 }
 
@@ -89,6 +233,7 @@ void
 gdk_free_text_list (gchar **list)
 {
   g_return_if_fail (list != NULL);
+  g_warning ("gdk_free_text_list() not implemented\n");
 }
 
 gint
@@ -96,11 +241,13 @@ gdk_string_to_compound_text (const gchar *str,
                             GdkAtom *encoding, gint *format,
                             guchar **ctext, gint *length)
 {
+  g_warning ("gdk_string_to_compound_text() not implemented\n");
   return 0;
 }
 
 void gdk_free_compound_text (guchar *ctext)
 {
+  g_warning ("gdk_free_compound_text() not implemented\n");
 }
 
 /**
@@ -119,6 +266,7 @@ void gdk_free_compound_text (guchar *ctext)
 gchar *
 gdk_utf8_to_string_target (const gchar *str)
 {
+  g_warning ("gdk_utf8_to_string_target() not implemented\n");
   return 0;
 }
 
@@ -143,9 +291,80 @@ gdk_utf8_to_compound_text (const gchar *str,
                           guchar     **ctext,
                           gint        *length)
 {
+  g_warning ("gdk_utf8_to_compound_text() not implemented\n");
   return 0;
 }
 
+static gint
+make_list (const gchar  *text,
+          gint          length,
+          gboolean      latin1,
+          gchar      ***list)
+{
+  GSList *strings = NULL;
+  gint n_strings = 0;
+  gint i;
+  const gchar *p = text;
+  const gchar *q;
+  GSList *tmp_list;
+  GError *error = NULL;
+
+  while (p < text + length)
+    {
+      gchar *str;
+      
+      q = p;
+      while (*q && q < text + length)
+       q++;
+
+      if (latin1)
+       {
+         str = g_convert (p, q - p,
+                          "UTF-8", "ISO-8859-1",
+                          NULL, NULL, &error);
+
+         if (!str)
+           {
+             g_warning ("Error converting selection from STRING: %s",
+                        error->message);
+             g_error_free (error);
+           }
+       }
+      else
+       str = g_strndup (p, q - p);
+
+      if (str)
+       {
+         strings = g_slist_prepend (strings, str);
+         n_strings++;
+       }
+
+      p = q + 1;
+    }
+
+  if (list)
+    *list = g_new (gchar *, n_strings + 1);
+
+  (*list)[n_strings] = NULL;
+  
+  i = n_strings;
+  tmp_list = strings;
+  while (tmp_list)
+    {
+      if (list)
+       (*list)[--i] = tmp_list->data;
+      else
+       g_free (tmp_list->data);
+
+      tmp_list = tmp_list->next;
+    }
+
+  g_slist_free (strings);
+
+  return n_strings;
+}
+
+
 /**
  * gdk_text_property_to_utf8_list:
  * @encoding: an atom representing the encoding of the text
@@ -168,5 +387,71 @@ gdk_text_property_to_utf8_list (GdkAtom        encoding,
                                gint           length,
                                gchar       ***list)
 {
-  return 0;
+  g_return_val_if_fail (text != NULL, 0);
+  g_return_val_if_fail (length >= 0, 0);
+  
+  if (encoding == GDK_TARGET_STRING)
+    {
+      return make_list ((gchar *)text, length, TRUE, list);
+    }
+  else if (encoding == gdk_atom_intern ("UTF8_STRING", FALSE))
+    {
+      return make_list ((gchar *)text, length, FALSE, list);
+    }
+  else
+    {
+      gchar **local_list;
+      gint local_count;
+      gint i;
+      gchar *charset = NULL;
+      gboolean need_conversion = !g_get_charset (&charset);
+      gint count = 0;
+      GError *error = NULL;
+      
+      /* Probably COMPOUND text, we fall back to Xlib routines
+       */
+      local_count = gdk_text_property_to_text_list (encoding,
+                                                   format, 
+                                                   text,
+                                                   length,
+                                                   &local_list);
+      if (list)
+       *list = g_new (gchar *, local_count + 1);
+      
+      for (i=0; i<local_count; i++)
+       {
+         /* list contains stuff in our default encoding
+          */
+         if (need_conversion)
+           {
+             gchar *utf = g_convert (local_list[i], -1,
+                                     "UTF-8", charset,
+                                     NULL, NULL, &error);
+             if (utf)
+               {
+                 if (list)
+                   (*list)[count++] = utf;
+                 else
+                   g_free (utf);
+               }
+             else
+               {
+                 g_warning ("Error converting to UTF-8 from '%s': %s",
+                            charset, error->message);
+                 g_error_free (error);
+                 error = NULL;
+               }
+           }
+         else
+           {
+             if (list)
+               (*list)[count++] = g_strdup (local_list[i]);
+           }
+       }
+      
+      gdk_free_text_list (local_list);
+      (*list)[count] = NULL;
+
+      return count;
+    }
 }
index f7d300d389e9600690c2a14ce5e69d2c4830f43d..ddca101eae7149ba71b0cbe82b7c5418b1759bc3 100644 (file)
@@ -120,12 +120,10 @@ _gdk_windowing_window_init (void)
   GdkCursor *cursor;
   GdkWindowObject *private;
 
-  cursor = gdk_cursor_new (GDK_LEFT_PTR);
-
   attr.width = gdk_screen_width ();
   attr.height = gdk_screen_height ();
   attr.window_type = GDK_WINDOW_ROOT;
-  attr.cursor = cursor;
+  attr.cursor = NULL;
   attr.event_mask = GDK_EXPOSURE_MASK;
   attr.wclass = GDK_INPUT_OUTPUT;
   gdk_parent_root = gdk_window_new (NULL, &attr, GDK_WA_CURSOR);
@@ -137,8 +135,14 @@ _gdk_windowing_window_init (void)
   GDK_DRAWABLE_IMPL_FBDATA (gdk_parent_root)->lim_y = attr.height;
 
   _gdk_fb_screen_gc = gdk_gc_new (gdk_parent_root);
-  
+
   gdk_fb_drawable_clear (gdk_parent_root);
+  
+  /* Must be done after root is created, since gdk_cursor_new()
+   * references gdk_parent_root.
+   */
+  cursor = gdk_cursor_new (GDK_LEFT_PTR);
+  gdk_window_set_cursor (gdk_parent_root, cursor);
 }
 
 GdkWindow*
@@ -264,6 +268,8 @@ _gdk_windowing_window_destroy (GdkWindow *window,
                               gboolean   recursing,
                               gboolean   foreign_destroy)
 {
+  _gdk_selection_window_destroyed (window);
+
 #if 0
   GdkWindowObject *private;
   GdkWindowObject *temp_private;
@@ -764,26 +770,6 @@ recompute_drawable (GdkDrawable *drawable)
     recompute_abs_positions (drawable, 0, 0, 0, 0, INT_MAX, INT_MAX);
 }
 
-/* You can thank g_list_insert_sorted and GCompareFunc for these */
-static gint static_dx_hack, static_dy_hack;
-
-static gint
-compare_draw_rects (gconstpointer a, gconstpointer b)
-{
-  const GdkRegionBox *ba = a, *bb = b;
-
-  if (static_dy_hack > 0 && ba->y1 < bb->y1)
-    return 1;
-  if (static_dy_hack < 0 && ba->y1 > bb->y1)
-    return 1;
-  if (static_dx_hack > 0 && ba->x1 < bb->x1)
-    return 1;
-  if (static_dx_hack < 0 && ba->x1 > bb->x1)
-    return 1;
-
-  return -1;
-}
-
 void
 gdk_fb_window_move_resize (GdkWindow *window,
                           gint       x,
@@ -794,6 +780,7 @@ gdk_fb_window_move_resize (GdkWindow *window,
 {
   GdkWindowObject *private;
   gint dx, dy, dw, dh;
+  gint i, draw_dir;
 
   g_return_if_fail (window != NULL);
   g_return_if_fail (GDK_IS_WINDOW (window));
@@ -832,9 +819,7 @@ gdk_fb_window_move_resize (GdkWindow *window,
          if (send_expose_events)
            {
              GdkRegion *new_region, *region;
-             int i;
              gboolean handle_cursor = FALSE;
-             GList *rects, *ltmp, *next;
 
              new_region = gdk_fb_clip_region (GDK_DRAWABLE_IMPL (window), NULL, TRUE, FALSE);
 
@@ -853,26 +838,14 @@ gdk_fb_window_move_resize (GdkWindow *window,
                    }
 
                  gdk_fb_drawing_context_init (&fbdc, GDK_DRAWABLE_IMPL (gdk_parent_root), NULL, FALSE, FALSE);
-                 g_print ("[%p] %ld rect +[%d, %d] move [%d, %d] from [%d, %d] to [%d, %d]\n",
-                          window,
-                          region->numRects,
-                          region->rects[0].x2 - region->rects[0].x1,
-                          region->rects[0].y2 - region->rects[0].y1,
-                          dx, dy,
-                          region->rects[0].x1 - dx,
-                          region->rects[0].y1 - dy,
-                          region->rects[0].x1,
-                          region->rects[0].y1);
                  
-                 static_dx_hack = dx;
-                 static_dy_hack = dy;
-
-                 for (rects = NULL, i = 0; i < region->numRects; i++)
-                   rects = g_list_insert_sorted (rects, &region->rects[i], compare_draw_rects);
-
-                 for (ltmp = rects; ltmp; ltmp = next)
+                 draw_dir = 1;
+                 if ((dy>0) || ((dy==0) && (dx>0)))
+                   draw_dir = -1;
+                             
+                 for (i=(draw_dir>0)?0:region->numRects-1;i >= 0 && i < region->numRects; i+=draw_dir)
                    {
-                     GdkRegionBox *reg = ltmp->data;
+                     GdkRegionBox *reg = &region->rects[i];
 
                      gdk_fb_draw_drawable_3 (GDK_DRAWABLE_IMPL(gdk_parent_root),
                                              _gdk_fb_screen_gc,
@@ -884,8 +857,6 @@ gdk_fb_window_move_resize (GdkWindow *window,
                                              (reg->y1),
                                              (reg->x2 - reg->x1),
                                              (reg->y2 - reg->y1));
-                     next = ltmp->next;
-                     g_list_free_1 (ltmp);
                    }
                  gdk_fb_drawing_context_finalize (&fbdc);
                }
@@ -894,13 +865,6 @@ gdk_fb_window_move_resize (GdkWindow *window,
              gdk_region_subtract (new_region, region);
              gdk_region_destroy (region);
 
-#if 0
-             g_print("Redraw region enclosed by [%d, %d] +[%d, %d]\n",
-                     new_region->extents.x1, new_region->extents.y1,
-                     new_region->extents.x2 - new_region->extents.x1,
-                     new_region->extents.y2 - new_region->extents.y1);
-#endif
-             
              gdk_window_invalidate_region_clear (gdk_parent_root, new_region);
              if (handle_cursor)
                gdk_fb_cursor_unhide ();
index fdfb1aa157b5ab8c4358221ed8d5c3944ff452f8..e520581efcb7e5f7072d10589b2e2da66c600a5e 100644 (file)
@@ -59,6 +59,8 @@
 #include "x11/gdkx.h"          /* For gdk_window_lookup() */
 #elif defined (GDK_WINDOWING_WIN32)
 #include "win32/gdkwin32.h"    /* For gdk_window_lookup() */
+#elif defined (GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"    /* For gdk_window_lookup() */
 #elif defined (GDK_WINDOWING_NANOX)
 #include "nanox/gdkprivate-nanox.h"    /* For gdk_window_lookup() */
 #endif
@@ -980,7 +982,7 @@ gtk_selection_request (GtkWidget *widget,
   
   /* Create GdkWindow structure for the requestor */
   
-#if defined(GDK_WINDOWING_WIN32) || defined(GDK_WINDOWING_X11)
+#if defined(GDK_WINDOWING_WIN32) || defined(GDK_WINDOWING_X11) || defined(GDK_WINDOWING_FB) 
   info->requestor = gdk_window_lookup (event->requestor);
   if (!info->requestor)
     info->requestor = gdk_window_foreign_new (event->requestor);